<?php
global $language, $base_path;
$user = $items['user'];
$action_prefix = "/".$language->language . $base_path;
$form_output = $items['form'];
$user_pic_uri = 'public://user_pictures/avatar_default.png';
if(!empty($user->picture)) {
  $file = file_load($user->picture->fid);
  $user_pic_uri = $file->uri;
}
$user_pic = file_create_url($user_pic_uri);

$profile_path = $action_prefix . "profile/edit";
if($items['from'] == 'exp') {
  $profile_path = $action_prefix . "experiences/profile/".$items['nid'];
}

?>
<!-- header -->
<?php if(empty($items['from'])):?>
<div class="content-inner">
  <div class="crumb-mod">
    <ul class="breadcrumb">
      <li>
        <i class="icon-home">
        </i>
        <a href="/">
          <?php print t("Home");?>
        </a>
        <span class="divider">
          /
        </span>
      </li>
      <li class="active">
        <?php print t("Profile")?>
      </li>
    </ul>
  </div>
<?php endif; ?>
<!-- left bar-->
  <div class="col-side">
    <div class="current-user">
    <img src="<?php print $user_pic; ?>" class="avator">
      <strong class="name">
        <?php print $user->name; ?>
      </strong>
    </div>
    <ul class="nav nav-list">
      <li class="nav-header">
        <?php print t("Profile");?>
      </li>
      <li class="<?php if($items['type'] == 'basic') print 'active';?>">
        <a href="<?php print $profile_path. "/basic"; ?>">
          <i class="icon-user">
          </i>
          <?php print t("Basic profile"); ?>
        </a>
      </li>
      <li class="<?php if($items['type'] == 'service') print 'active';?>">
        <a href="<?php print $profile_path. "/service"; ?>">
          <i class="icon-map-marker">
          </i>
          <?php print t("Service profile"); ?>
        </a>
      </li>
      <?php if(empty($items['from'])):?>
      <li class="<?php if($items['type'] == 'password') print 'active';?>">
        <a href="<?php print $profile_path. "/password"; ?>">
          <i class="icon-question-sign">
          </i>
          <?php print t("Change Password");?>
        </a>
      </li>
      <?php endif;?>
    </ul>
  </div>

<!-- right bar-->
<div class="col-main">
<?php print $form_output; ?>
</div>
</div>
